package com.naiterui.ehp.bs.doctor.service.user;

import java.util.List;

import com.naiterui.ehp.bp.bo.esign.DigitalCertificateBO;
import com.naiterui.ehp.bp.bo.esign.EsignNoSecretBO;
import com.naiterui.ehp.bp.bo.esign.PreSignResultBO;
import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.doctor.vo.sign.WillTypeVO;

/**
 * @Description 电子签名接口
 * @Author gongbaoqiang
 * @Date 2020/6/8 3:49 PM
 */
public interface IEsignUserService {

    /**
     * 获取医生实名认证验证码
     * @param doctorId
     * @throws BusinessException
     */
    void getRealnameCode(Long doctorId) throws BusinessException;

    /**
     * 校验医生实名认证验证码
     * @param doctorId
     * @throws BusinessException
     */
    void checkRealnameCode(Long doctorId, String code) throws BusinessException;

    /**
     * 意愿签署列表
     * @return
     * @throws BusinessException
     */
    List<WillTypeVO> getWillTypes(Long doctorId) throws BusinessException;

    /**
     * 更新药师意愿签名方式
     * @param doctorId
     * @param willType
     * @throws BusinessException
     */
    void updateWillType(Long doctorId, String willType) throws BusinessException;

    /**
     * 更新签名密码
     * @param doctorId
     * @param passwd
     * @throws BusinessException
     */
    void updatePassword(Long doctorId, String passwd, String code) throws BusinessException;

    /**
     * 当前医生是否已设置密码
     * @param doctorId
     * @throws BusinessException
     */
    Boolean passwordStatus(Long doctorId) throws BusinessException;

    /**
     * 获取是否设置了免密
     * @param doctorId
     * @return
     * @throws BusinessException
     */
    EsignNoSecretBO getNoSecretByDoctorId(Long doctorId) throws BusinessException;

    /***
     * 免签预签署
     * 
     * @param doctorId
     * @return
     * @throws BusinessException
     */
    PreSignResultBO preNoSecret(Long doctorId) throws BusinessException;

    /**
     * 设置免密
     * 
     * @param doctorId
     * @param noSecret
     * @param authPwd
     * @param uniqueId
     * @throws BusinessException
     */
    void setNoSecret(Long doctorId, Boolean noSecret, String authPwd, String uniqueId) throws BusinessException;

    /**
     * 获取医生数字证书
     * 
     * @param doctorId
     * @return
     * @throws BusinessException
     */
    DigitalCertificateBO getDigitalCertificate(Long doctorId) throws BusinessException;
}
